package main

import "fmt"

func main() {
	type user struct {
		name string
		age  int
	}

	m := make(map[int]user)

	u1 := user{
		name: "yyt",
		age:  18,
	}
	m[1] = u1

	// m[1].age = 20 //cannot assign to struct field m[1].age in

	u11 := m[1]
	u11.age = 22
	m[1] = u11
	fmt.Println(m)

	u1.age = 0
	m[1] = u1

	fmt.Println(m)
}
